#
# Copyright (C) 2019-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
#

set(NEO_CORE_HELPERS
    ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
    ${CMAKE_CURRENT_SOURCE_DIR}/abort.h
    ${CMAKE_CURRENT_SOURCE_DIR}/address_patch.h
    ${CMAKE_CURRENT_SOURCE_DIR}/aligned_memory.h
    ${CMAKE_CURRENT_SOURCE_DIR}/api_specific_config.h
    ${CMAKE_CURRENT_SOURCE_DIR}/array_count.h
    ${CMAKE_CURRENT_SOURCE_DIR}/aux_translation.h
    ${CMAKE_CURRENT_SOURCE_DIR}/basic_math.h
    ${CMAKE_CURRENT_SOURCE_DIR}/bindless_heaps_helper.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/bindless_heaps_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/bit_helpers.h
    ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_base.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_bdw_plus.inl
    ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/blit_commands_helper_extra.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/built_ins_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/cache_policy.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/cache_policy.h
    ${CMAKE_CURRENT_SOURCE_DIR}/common_types.h
    ${CMAKE_CURRENT_SOURCE_DIR}/compiler_options_parser.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/compiler_options_parser.h
    ${CMAKE_CURRENT_SOURCE_DIR}/completion_stamp.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/completion_stamp.h
    ${CMAKE_CURRENT_SOURCE_DIR}/constants.h
    ${CMAKE_CURRENT_SOURCE_DIR}/debug_helpers.h
    ${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/dirty_state_helpers.h
    ${CMAKE_CURRENT_SOURCE_DIR}/engine_control.h
    ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/engine_node_helper.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/engine_node_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/extendable_enum.h
    ${CMAKE_CURRENT_SOURCE_DIR}/file_io.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/file_io.h
    ${CMAKE_CURRENT_SOURCE_DIR}/flat_batch_buffer_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/flat_batch_buffer_helper.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/flat_batch_buffer_helper_hw.h
    ${CMAKE_CURRENT_SOURCE_DIR}/flat_batch_buffer_helper_hw.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.h
    ${CMAKE_CURRENT_SOURCE_DIR}/get_info.h
    ${CMAKE_CURRENT_SOURCE_DIR}/hash.h
    ${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner.h
    ${CMAKE_CURRENT_SOURCE_DIR}/heap_assigner.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/heap_helper.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/heap_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_base.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_bdw_plus.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_bdw_to_icllp.inl
    ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/hw_helper_extended.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tgllp_plus.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h
    ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/hw_info_extended.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/interlocked_max.h
    ${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.h
    ${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties.h
    ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen.h
    ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen_avx2.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen_sse4.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/non_copyable_or_moveable.h
    ${CMAKE_CURRENT_SOURCE_DIR}/options.h
    ${CMAKE_CURRENT_SOURCE_DIR}/pause_on_gpu_properties.h
    ${CMAKE_CURRENT_SOURCE_DIR}/pipeline_select_args.h
    ${CMAKE_CURRENT_SOURCE_DIR}/pipeline_select_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/populate_factory.h
    ${CMAKE_CURRENT_SOURCE_DIR}/preamble.h
    ${CMAKE_CURRENT_SOURCE_DIR}/preamble_base.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/preamble_bdw_plus.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/preprocessor.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ptr_math.h
    ${CMAKE_CURRENT_SOURCE_DIR}/register_offsets.h
    ${CMAKE_CURRENT_SOURCE_DIR}/registered_method_dispatcher.h
    ${CMAKE_CURRENT_SOURCE_DIR}/simd_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address.h
    ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_base.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_bdw.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_skl_plus.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_bdw_plus.inl
    ${CMAKE_CURRENT_SOURCE_DIR}/state_compute_mode_helper.h
    ${CMAKE_CURRENT_SOURCE_DIR}/stdio.h
    ${CMAKE_CURRENT_SOURCE_DIR}/string.h
    ${CMAKE_CURRENT_SOURCE_DIR}/surface_format_info.h
    ${CMAKE_CURRENT_SOURCE_DIR}/timestamp_offsets.h
    ${CMAKE_CURRENT_SOURCE_DIR}/timestamp_packet.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/timestamp_packet.h
    ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/timestamp_packet_extra.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/uint16_avx2.h
    ${CMAKE_CURRENT_SOURCE_DIR}/uint16_sse4.h
    ${CMAKE_CURRENT_SOURCE_DIR}/vec.h
    ${CMAKE_CURRENT_SOURCE_DIR}/definitions/${BRANCH_DIR_SUFFIX}/hw_cmds.h
    ${CMAKE_CURRENT_SOURCE_DIR}/definitions/${BRANCH_DIR_SUFFIX}/engine_group_types.h
    ${CMAKE_CURRENT_SOURCE_DIR}/definitions/pipe_control_args_base.h
    ${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/pipe_control_args.h
)

set_property(GLOBAL PROPERTY NEO_CORE_HELPERS ${NEO_CORE_HELPERS})
if(WIN32)
  set(NEO_CORE_SRCS_HELPERS_WINDOWS
      ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.cpp
      ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.h
      ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.inl
  )
  set_property(GLOBAL PROPERTY NEO_CORE_SRCS_HELPERS_WINDOWS ${NEO_CORE_SRCS_HELPERS_WINDOWS})
endif()

add_subdirectories()
